package com.tiandao.mofang.core.role;

import com.tiandao.mofang.core.RobotSingleton;

import java.awt.*;
import java.awt.event.KeyEvent;
//基础打怪
public class BaseDG implements Runnable {
    private static Robot robot = RobotSingleton.getInstance();
    @Override
    public void run() {
        start();
    }

    public static void start(){
        while (true){
            try {
                Thread.sleep(900);
                robot.keyPress(KeyEvent.VK_1);
                robot.keyRelease(KeyEvent.VK_1);
                Thread.sleep(900);
                robot.keyPress(KeyEvent.VK_2);
                robot.keyRelease(KeyEvent.VK_2);
                Thread.sleep(900);
                robot.keyPress(KeyEvent.VK_3);
                robot.keyRelease(KeyEvent.VK_3);
                Thread.sleep(900);
                robot.keyPress(KeyEvent.VK_4);
                robot.keyRelease(KeyEvent.VK_4);
                Thread.sleep(900);
                robot.keyPress(KeyEvent.VK_Q);
                robot.keyRelease(KeyEvent.VK_Q);
                Thread.sleep(900);
                robot.keyPress(KeyEvent.VK_E);
                robot.keyRelease(KeyEvent.VK_E);
                Thread.sleep(900);
                robot.keyPress(KeyEvent.VK_R);
                robot.keyRelease(KeyEvent.VK_R);
                Thread.sleep(900);
                robot.keyPress(KeyEvent.VK_T);
                robot.keyRelease(KeyEvent.VK_T);
                Thread.sleep(900);
                robot.keyPress(KeyEvent.VK_G);
                robot.keyRelease(KeyEvent.VK_G);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }


}
